<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>躲避障碍物游戏</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="game-container">
        <h1>躲避障碍物游戏</h1>
        <div class="game-info">
            <div class="score">得分: <span id="score">0</span></div>
            <div class="controls">
                <button id="startBtn" class="btn btn-primary">开始游戏</button>
                <button id="pauseBtn" class="btn btn-secondary" disabled>暂停</button>
                <button id="resetBtn" class="btn btn-danger">重置</button>
            </div>
        </div>
        <canvas id="gameCanvas" width="800" height="600"></canvas>
        <div class="instructions">
            <p>使用方向键 ← → 控制小球移动，躲避下落的障碍物！</p>
        </div>
    </div>

    <div id="gameOverModal" class="modal">
        <div class="modal-content">
            <h2>游戏结束！</h2>
            <p>最终得分: <span id="finalScore">0</span></p>
            <button id="playAgainBtn" class="btn btn-primary">再来一局</button>
        </div>
    </div>

    <script src="game.js"></script>
</body>
</html>
